/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package UserObject;
import DuLieu.GiaoTiep;
/**
 *
 * @author NSPDL
 */
public class BDSChamCong implements GiaoTiep{
    private NhanVien nhanVien;
    private PhongBan phongBan;
    private int SNlamViec;

    public BDSChamCong() {
    }

    public BDSChamCong(NhanVien nhanVien, PhongBan phongBan, int SNlamViec) {
        this.nhanVien = nhanVien;
        this.phongBan = phongBan;
        this.SNlamViec = SNlamViec;
    }

    public NhanVien getNhanVien() {
        return nhanVien;
    }

    public void setNhanVien(NhanVien nhanVien) {
        this.nhanVien = nhanVien;
    }

    public PhongBan getPhongBan() {
        return phongBan;
    }

    public void setPhongBan(PhongBan phongBan) {
        this.phongBan = phongBan;
    }

    public int getSNlamViec() {
        return SNlamViec;
    }

    public void setSNlamViec(int SNlamViec) {
        this.SNlamViec = SNlamViec;
    }
    public int getMaNV()
    {
        return this.nhanVien.getIdNV();
    }
    public int getMaPB()
    {
        return this.phongBan.getIdPhong();
    }
    public String getTenNV()
    {
        return this.nhanVien.getHoTen();
    }
    @Override
    public Object[] toObject() {
        return new Object[]{getMaNV(),getTenNV(),getMaPB(),SNlamViec};
    }
}
